<?php
function user()
{
	return $user = array(
		'cm'=>'123',
		'cj'=>'123',
	);
	
}
$username = trim($_REQUEST['username']);
$pass = trim($_REQUEST['password']);
//$setCookie("t",$username);
if(array_key_exists($username,user()) && in_array($pass,user())){
	setcookie('upls',MD5($username.$pass));
	setcookie('user',$username);
	header("Location:index.php");
}else{
	header("Location:login.html");
	exit();
}


//echo "cookie".$_COOKIE['upls'];
?>
